f75e197d
@@ -648,6 +648,17 @@
     public String toString() {
       return varname;
     }
+
+    private static String findHadoopBinary() {
+      String val = System.getenv("HADOOP_HOME");
+      // In Hadoop 1.X and Hadoop 2.X HADOOP_HOME is gone and replaced with HADOOP_PREFIX
+      if (val == null) {
+        val = System.getenv("HADOOP_PREFIX");
+      }
+      // and if all else fails we can at least try /usr/bin/hadoop
+      return (val == null ? File.separator + "usr" : val)
+        + File.separator + "bin" + File.separator + "hadoop";
+    }
   }
 
   /**
@@ -907,16 +918,6 @@
private static void applyDefaultNonNullConfVars(Configuration conf) {
     }
   }
 
-  private static String findHadoopBinary() {
-    String val = System.getenv("HADOOP_HOME");
-    // In Hadoop 1.X and Hadoop 2.X HADOOP_HOME is gone and replaced with HADOOP_PREFIX
-    if (val == null) {
-      val = System.getenv("HADOOP_PREFIX");
-    }
-    // and if all else fails we can at least try /usr/bin/hadoop
-    return (val == null ? File.separator + "usr" : val) + File.separator + "bin" + File.separator + "hadoop";
-  }
-
   public Properties getChangedProperties() {
     Properties ret = new Properties();
     Properties newProp = getAllProperties();
